/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package datamodel;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

/**
 *
 * @author Kvest
 */
public class Order2 extends Order
{
    public static final byte ORDER_2 = 2;
    
    public Order2(int orderID)
    {
        super(orderID);
    }

    public Order2(byte[] data) throws IOException
    {
        super(data);
    }

    protected void readFields(DataInputStream dis) throws IOException
    {
        super.readFields(dis);
        
        //Пропускаем тип заказа
        dis.read();
    }
    
    protected void writeFields(DataOutputStream dos) throws IOException
    {
        super.writeFields(dos);
        
        //Помечаем тип заказа
        dos.write(ORDER_2);
    }
}
